package com.yhsimon.command;

/**
 * @author： YHSimon
 * @date： 2021-10-09 10:41
 */
public class LightOnCommand implements Command{
    private LightReceiver light;

    public LightOnCommand(LightReceiver light){
        this.light=light;
    }
    @Override
    public void execute() {
        light.on();
    }

    @Override
    public void undo() {
        light.off();
    }
}
